package com.ajie.entity;

import com.ajie.entity.dto.Option;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * @author: ajie
 * @createTime: 2024-06-22 18:03
 */
@Data
@TableName("sys_user")
@Tag(name = "")
@EqualsAndHashCode(callSuper = false)
public class SysUser extends BaseEntity {

    /**
     * 账号
     */
    @Schema(title = "用户名", description = "登陆账号")
    private String username;
    /**
     * 密码
     */
    @Schema(description = "密码")
    private String password;
    /**
     * 用户的密码盐
     */
    @Schema(hidden = true)
    private String slat;
    /**
     * 性别;0男1女2未知
     */
    @Schema(title = "性别", description = "0男1女2未知")
    private Integer sex;
    /**
     * 昵称
     */
    @Schema(description = "昵称")
    private String nickname;
    /**
     * 电话
     */
    @Schema(description = "电话")
    private String phone;
    /**
     * 邮箱
     */
    @Schema(description = "邮箱")
    private String email;
    /**
     * 头像
     */
    @Schema(description = "头像")
    private String avatar;

    @Schema(description = "微信小程序标识")
    private String openid;

    @TableField(exist = false)
    @Schema(description = "角色列表")
    private List<Option> roles;
}
